<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=!, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        var a1 = prompt('请输入字符串：')
        b=(a1>="a" && a1<="z"||a1>='A' && a1<="Z")?'字母':(a1>=0&&a1<=9)?'数字':(a1>="\u4e00"&&a1<="\u9fa5")?'汉字':'其他';

        alert(b);

    </script>
</body>
</html>